1. Field of the Invention
The present general inventive concept relates to processing images in the field of scanning and copying and detecting correct orientation of the processed images, and more particularly, to text recognition.
2. Description of the Related Art
Efforts to improve quality assurances and to process recognition of text include a necessity to automatically detect orientation of individual pages. Inverted pages (the top side is down) are found during scanning of paper documents. Orientation of page of the document is determined by a direction in which lines of the text are printed. During a printing operation, the text is usually typed in a portrait or landscape mode. Hence, the page can be printed in a horizontal mode of print (portrait mode) or in a vertical mode of print (landscape mode). In processing recognition of text, it is important to know orientation of the text in the image of the document prior to beginning operation of recognition. For automation of process of recognition of the text, automatic detection of orientation of pages improves general productivity.
It is also important to copy the pages fed from an automatic feeder with a correct orientation for the further processing, for example, by a stapler, a puncher or a machine for binding printed blocks. The present general inventive concept provides a new algorithm which can be used in Multipurpose Digital Devices (MFP) and can automatically detect orientation of a document.
Previous methods for detecting orientation of a document use a technique to detect orientation of a document based on vertical and horizontal variations of profiles of projections in a binary image. The main reason for errors in these methods is presence of non-text data. Algorithms of such methods work only for documents with prevalence of the text. Thus, a first operation of detecting orientation of the document is finding the text.
U.S. Pat. No. 5,767,978 [1] describes a method of classifying areas of an image into 3 classes, such as traditional text, line-art image and photo. Classification is carried out using the collected statistics of the image on variation values of brightness and absolute brightness value of each pixel. Obviously, the result of classification depends on the accuracy of the algorithm used to segment an area of the image. Classification can be erroneous if the area of the image contains data which belongs to one or more class. For example, if the area of the image contains text and photo, it can be classified into any one of three classes. Reliability of classification can be improved, using a divider of areas instead of a divider of lines and using more complex methods of classification of areas. Areas of line-art images that have intermediate attributes and areas which do not satisfy criteria of text or photo are classified into line-art image.
U.S. Pat. No. 5,889,884 [2] describes a method of automatically defining orientation of an image (normal, inverted) of a document. The algorithm operates for texts in Romance languages. Thus, distribution of cumulative values of pixels in profiles of projections in vertical and horizontal directions is analyzed. However, the algorithm works only for binary images of documents with prevalence of the text and is not capable of detecting portrait/landscape orientation. The algorithm does not operate for color images and a document containing photos.